package com.rfid.emergencywarehouse.adapter;

import com.rfid.emergencywarehouse.entity.BarcodeInfo;

import java.util.List;

public class AddAssetScanBarcodeAdapter extends MutilChoiceScanBarCodeAdapter{
    public AddAssetScanBarcodeAdapter(List<BarcodeInfo> data) {
        super(data);
    }

    @Override
    protected void bindView(MyHolder holder, int position, BarcodeInfo t) {
        super.bindView(holder, position, t);
        boolean isNew = mData.get(position).isNew();
        holder.status.setText(isNew ? "物料状态：新增":"物料状态：已存在");
    }

    @Override
    protected boolean canSelect(BarcodeInfo barcodeInfo) {
        return barcodeInfo.isNew();
    }
}
